package com.hcz.controller;

import com.hcz.pojo.User;
import com.hcz.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author hcz
 * @describtion TODO
 * @date 2019-06-21 12:33
 */
@RestController
@RequestMapping("user")
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping("{id}")
    public User getUser(@PathVariable("id")Long id){
        return  userService.getUser(id);
    }

}
